<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Parts extends Model
{

    protected $table = 'parts';

    protected $guarded = [];

    public function belongsToManyProduct(){
        return $this->belongsToMany('App\Product','ProductParts','parts_id','product_id');
    }
    public function belongsToManyBatch(){
        return $this->belongsToMany('App\PartsBatch','PartBatch','parts_id','id');
    }

}
